package action.contract;

import service.contract.ShowContractService;
import model.TContract;
import model.contract.Contractensure;
import model.contract.Contractmortgage;
import model.contract.Contractpledge;
import core.action.BaseAction;
import exception.Exceptions;

public class ContractUpdateAction extends BaseAction{
	private Integer id;
	private Integer ensureid;
	private Integer mortgageid;
	private Integer pledgeid;
	private TContract contractloan;
	private Contractensure contractensure;
	private Contractmortgage contractmortgage;
	private Contractpledge contractpledge;
	private ShowContractService showContractService;
	
	public String flag="audit";
	
	public String execute(){
		return "success";
	}
	
	public String ContractLoan() throws Exceptions{
		contractloan=showContractService.get_ht(id);
		successResultValue="../contract/contractLoan";
		return "function";
		
	}
	
	public String ContractEnsure() throws Exceptions{
		contractensure=showContractService.get_htEnsure(ensureid);
		successResultValue="../contract/contractEnsure";
		return "function";
	}
	
	public String ContractMortgage() throws Exceptions{
		contractmortgage=showContractService.get_htMortgage(mortgageid);
		successResultValue="../contract/contractMortgage";
		return "function";
	}
	
	public String ContractPledge() throws Exceptions{
		contractpledge=showContractService.get_htPledge(pledgeid);
		successResultValue="../contract/contractPledge";
		return "function";
	}
	
	
	
	//----------GET/SET-------//
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getEnsureid() {
		return ensureid;
	}
	public void setEnsureid(Integer ensureid) {
		this.ensureid = ensureid;
	}
	public Integer getMortgageid() {
		return mortgageid;
	}
	public void setMortgageid(Integer mortgageid) {
		this.mortgageid = mortgageid;
	}
	public Integer getPledgeid() {
		return pledgeid;
	}
	public void setPledgeid(Integer pledgeid) {
		this.pledgeid = pledgeid;
	}
	public TContract getContractloan() {
		return contractloan;
	}

	public void setContractloan(TContract contractloan) {
		this.contractloan = contractloan;
	}

	public Contractensure getContractensure() {
		return contractensure;
	}

	public void setContractensure(Contractensure contractensure) {
		this.contractensure = contractensure;
	}

	public Contractmortgage getContractmortgage() {
		return contractmortgage;
	}

	public void setContractmortgage(Contractmortgage contractmortgage) {
		this.contractmortgage = contractmortgage;
	}

	public Contractpledge getContractpledge() {
		return contractpledge;
	}

	public void setContractpledge(Contractpledge contractpledge) {
		this.contractpledge = contractpledge;
	}

	public ShowContractService getShowContractService() {
		return showContractService;
	}

	public void setShowContractService(ShowContractService showContractService) {
		this.showContractService = showContractService;
	}
}
